package com.gitee.qdbp.jdbc.result;

import org.springframework.jdbc.core.RowMapper;
import com.gitee.qdbp.able.jdbc.condition.TableJoin;

/**
 * 结果集行数据到JavaBean的转换工具
 *
 * @author zhaohuihua
 * @version 190617
 */
public interface RowToBeanMapper<T> extends RowMapper<T> {

    /**
     * Row到Bean转换处理工厂类 (单表)
     *
     * @author zhaohuihua
     * @version 20210308
     * @serial 3.3.0
     */
    interface FactoryOfTable {

        /** 获取Row到Bean的转换处理类 (单表) **/
        <T> RowToBeanMapper<T> getRowToBeanMapper(Class<T> mappedClass);
    }

    /**
     * Row到Bean转换处理工厂类 (多表关联)
     *
     * @author zhaohuihua
     * @version 20210308
     * @serial 3.3.0
     */
    interface FactoryOfTables {

        /** 获取Row到Bean的转换处理类 (多表关联) **/
        <T> RowToBeanMapper<T> getRowToBeanMapper(TableJoin tables, Class<T> mappedClass);
    }
}
